package com.ruoyi.wbs.mapper;

import java.util.List;
import com.ruoyi.wbs.domain.Contractor;
import org.apache.ibatis.annotations.Param;

/**
 * 承包商Mapper接口
 * 
 * @author renyuxin
 * @date 2024-06-19
 */
public interface ContractorMapper 
{
    /**
     * 查询承包商
     * 
     * @param contractorId 承包商主键
     * @return 承包商
     */
    public Contractor selectContractorByContractorId(Long contractorId);

    /**
     * 查询承包商列表
     * 
     * @param contractor 承包商
     * @return 承包商集合
     */
    public List<Contractor> selectContractorList(Contractor contractor);

    /**
     * 新增承包商
     * 
     * @param contractor 承包商
     * @return 结果
     */
    public int insertContractor(Contractor contractor);

    /**
     * 修改承包商
     * 
     * @param contractor 承包商
     * @return 结果
     */
    public int updateContractor(Contractor contractor);

    /**
     * 删除承包商
     * 
     * @param contractorId 承包商主键
     * @return 结果
     */
    public int deleteContractorByContractorId(Long contractorId);

    /**
     * 批量删除承包商
     * 
     * @param contractorIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteContractorByContractorIds(Long[] contractorIds);

    List<Contractor> selectContractorListForUser(@Param("contractor") Contractor contractor,@Param("userId") Long userId);

    /**
     * 按照projectId查询contractor
     * @param projectId
     * @return
     */
    List<Contractor> selectContractorListByProjectId(Long projectId);
}
